package org.ztr.yanai.blog.constant;

/**
 * @Author: ZhaoTR
 * @Date: Created in 2025/11/22 14:30
 * @Description: 消息常量类，统一管理系统提示信息
 * @Version: 1.0
 */
public class MessageConstants {

    private MessageConstants() {
        throw new IllegalStateException("Constant class");
    }

    /**
     * 通用消息
     */
    public static class Common {
        public static final String SUCCESS = "操作成功";
        public static final String FAILED = "操作失败";
        public static final String SYSTEM_ERROR = "系统错误，请稍后重试";
        public static final String PARAM_ERROR = "参数错误";
        public static final String UNAUTHORIZED = "未登录或登录已过期";
        public static final String ACCESS_DENIED = "权限不足";
    }

    /**
     * 用户相关消息
     */
    public static class User {
        public static final String LOGIN_SUCCESS = "登录成功";
        public static final String LOGIN_FAILED = "用户名或密码错误";
        public static final String LOGOUT_SUCCESS = "退出登录成功";
        public static final String REGISTER_SUCCESS = "注册成功";
        public static final String USER_NOT_FOUND = "用户不存在";
        public static final String USER_DISABLED = "账号已被禁用";
        public static final String USERNAME_EXISTS = "用户名已存在";
        public static final String EMAIL_EXISTS = "邮箱已被注册";
        public static final String PASSWORD_ERROR = "密码错误";
        public static final String PASSWORD_WEAK = "密码强度不足，请包含字母和数字";
        public static final String PASSWORD_MISMATCH = "两次密码不一致";
    }

    /**
     * 文章相关消息
     */
    public static class Post {
        public static final String CREATE_SUCCESS = "文章创建成功";
        public static final String UPDATE_SUCCESS = "文章更新成功";
        public static final String DELETE_SUCCESS = "文章删除成功";
        public static final String POST_NOT_FOUND = "文章不存在";
        public static final String TITLE_EMPTY = "标题不能为空";
        public static final String CONTENT_EMPTY = "内容不能为空";
        public static final String PUBLISH_SUCCESS = "文章发布成功";
    }

    /**
     * 评论相关消息
     */
    public static class Comment {
        public static final String CREATE_SUCCESS = "评论成功";
        public static final String DELETE_SUCCESS = "评论删除成功";
        public static final String COMMENT_NOT_FOUND = "评论不存在";
        public static final String CONTENT_EMPTY = "评论内容不能为空";
    }

    /**
     * 验证码相关消息
     */
    public static class Captcha {
        public static final String SEND_SUCCESS = "验证码发送成功";
        public static final String SEND_FAILED = "验证码发送失败";
        public static final String INVALID = "验证码错误";
        public static final String EXPIRED = "验证码已过期";
        public static final String TOO_FREQUENT = "发送过于频繁，请稍后再试";
    }

    /**
     * 文件相关消息
     */
    public static class File {
        public static final String UPLOAD_SUCCESS = "文件上传成功";
        public static final String UPLOAD_FAILED = "文件上传失败";
        public static final String TYPE_NOT_ALLOWED = "文件类型不允许";
        public static final String SIZE_EXCEEDED = "文件大小超出限制";
        public static final String FILE_NOT_FOUND = "文件不存在";
    }
}
